package cn.geminis.warehouse.service.inventory.entity;

import cn.geminis.lowcode.annotation.CrudController;
import cn.geminis.lowcode.annotation.CrudRepository;
import cn.geminis.lowcode.annotation.QueryFilter;
import cn.geminis.lowcode.annotation.UuidEntity;
import jakarta.persistence.Column;
import jakarta.persistence.OneToMany;
import jakarta.persistence.OrderBy;
import lombok.Getter;
import lombok.Setter;

import java.util.Set;

/**
 * 盘点
 */
@Getter
@Setter
@UuidEntity
@QueryFilter
@CrudRepository
@CrudController
public class Inventory {

    /**
     * 状态
     */
    @Column(nullable = false)
    private String status;

    @OneToMany(mappedBy = "inventory")
//    @OrderBy("productBatch.product.name")
    private Set<InventoryDetail> details;

}
